oxenstored: add facilities to raise the max open fds uplimit
authorZheng Li <dev@zheng.li>
Thu, 25 Sep 2014 17:34:55 +0000 (18:34 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 8 Oct 2014 13:18:46 +0000 (14:18 +0100)
commitb6afbcf41ddf5f44125eb6c2c3a27231b6af3e79
tree64cd14b30473aaea42272dc29a46d5265145d41a
parent1322076727ef8b21a3a0eb9726d89ff56dfcb837
oxenstored: add facilities to raise the max open fds uplimit

To go beyond 1024 fds, we also need to raise the process limitation on max
open fds (usually defaults to 1024).

We need to know the system level max open fds so that we won't go above that.
Simply setting the limit to RLIM_INFINITY doesn't work on Linux 3.x (EPERM), a
patch on this went into the 2.x branch but not 3.x for some reason.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
tools/ocaml/xenstored/select.ml
tools/ocaml/xenstored/select_stubs.c